#include <iostream>
#include <cmath>

using namespace std;

int main() {
    auto pentagonal = [](uint64_t n) -> bool {
        uint64_t x = (uint64_t)((sqrt(1 + 24 * n) + 1) / 6 + .5);
        return x * (3 * x - 1) / 2 == n;
    };
    auto hexagonal = [](uint64_t n) -> bool {
        uint64_t x = (uint64_t)((sqrt(1 + 8 * n) + 1) / 4 + .5);
        return x * (2 * x - 1) == n;
    };

    for (uint64_t i = 286; ; ++i) {
        uint64_t t = i * (i + 1) / 2;
        if (pentagonal(t) && hexagonal(t)) {
            cout << i << ": " << t << endl;
            break;
        }
    }
}